package com.xszx.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

/**
 * 
 * @TableName t_record
 */
@TableName(value ="t_record")
@Data
public class TRecord implements Serializable {
    /**
     * 记录id
     */
    @TableId(type = IdType.AUTO)
    private Long rid;

    /**
     * 资产id
     */
    private Long aid;

    /**
     * 用户id
     */
    private Long uid;

    /**
     * 部门id
     */
    private Long did;

    /**
     * 借日期
     */
    @JsonFormat(pattern="yyyy-MM-dd")
    private Date borrowdate;

    /**
     * 还日期
     */
    @JsonFormat(pattern="yyyy-MM-dd")
    private Date redate;

    /**
     * 状态
     */
    private String rstatus;

    /**
     * 类型
     */
    private String rtype;

    public Long getRid() {
        return rid;
    }

    public void setRid(Long rid) {
        this.rid = rid;
    }

    public Long getAid() {
        return aid;
    }

    public void setAid(Long aid) {
        this.aid = aid;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public Long getDid() {
        return did;
    }

    public void setDid(Long did) {
        this.did = did;
    }

    public Date getBorrowdate() {
        return borrowdate;
    }

    public void setBorrowdate(Date borrowdate) {
        this.borrowdate = borrowdate;
    }

    public Date getRedate() {
        return redate;
    }

    public void setRedate(Date redate) {
        this.redate = redate;
    }

    public String getRstatus() {
        return rstatus;
    }

    public void setRstatus(String rstatus) {
        this.rstatus = rstatus;
    }

    public String getRtype() {
        return rtype;
    }

    public void setRtype(String rtype) {
        this.rtype = rtype;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TRecord other = (TRecord) that;
        return (this.getRid() == null ? other.getRid() == null : this.getRid().equals(other.getRid()))
            && (this.getAid() == null ? other.getAid() == null : this.getAid().equals(other.getAid()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getDid() == null ? other.getDid() == null : this.getDid().equals(other.getDid()))
            && (this.getBorrowdate() == null ? other.getBorrowdate() == null : this.getBorrowdate().equals(other.getBorrowdate()))
            && (this.getRedate() == null ? other.getRedate() == null : this.getRedate().equals(other.getRedate()))
            && (this.getRstatus() == null ? other.getRstatus() == null : this.getRstatus().equals(other.getRstatus()))
            && (this.getRtype() == null ? other.getRtype() == null : this.getRtype().equals(other.getRtype()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRid() == null) ? 0 : getRid().hashCode());
        result = prime * result + ((getAid() == null) ? 0 : getAid().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getDid() == null) ? 0 : getDid().hashCode());
        result = prime * result + ((getBorrowdate() == null) ? 0 : getBorrowdate().hashCode());
        result = prime * result + ((getRedate() == null) ? 0 : getRedate().hashCode());
        result = prime * result + ((getRstatus() == null) ? 0 : getRstatus().hashCode());
        result = prime * result + ((getRtype() == null) ? 0 : getRtype().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", rid=").append(rid);
        sb.append(", aid=").append(aid);
        sb.append(", uid=").append(uid);
        sb.append(", did=").append(did);
        sb.append(", borrowdate=").append(borrowdate);
        sb.append(", redate=").append(redate);
        sb.append(", rstatus=").append(rstatus);
        sb.append(", rtype=").append(rtype);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}